/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ultrasoft.farmasoft.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Administrador
 */
@Embeddable
public class BillPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "periodId")
    private int periodId;
    @Basic(optional = false)
    @Column(name = "billId")
    private int billId;

    public BillPK() {
    }

    public BillPK(int periodId, int billId) {
        this.periodId = periodId;
        this.billId = billId;
    }

    public int getPeriodId() {
        return periodId;
    }

    public void setPeriodId(short periodId) {
        this.periodId = periodId;
    }

    public int getBillId() {
        return billId;
    }

    public void setBillId(int billId) {
        this.billId = billId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) periodId;
        hash += (int) billId;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof BillPK)) {
            return false;
        }
        BillPK other = (BillPK) object;
        if (this.periodId != other.periodId) {
            return false;
        }
        if (this.billId != other.billId) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.ultrasoft.farmasoft.domain.BillPK[ periodId=" + periodId + ", billId=" + billId + " ]";
    }
    
}
